{include file="common/header"/}
<div class="lemo-container">
    <div class="lemo-main">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>{:lang('config')}{:lang('list')}</legend>
        </fieldset>

        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">{:lang('site setting')}</li>
                <li class="">{:lang('email setting')}</li>
                <li class="">{:lang('sms setting')}</li>
                <li class="">{:lang('upload setting')}</li>
            </ul>
            <div class="layui-tab-content">
<!--网站配置-->
                    <div class="layui-tab-item layui-show">
                        <form class="layui-form layui-form-pane" action="{:url('site')}" lay-filter="form-config">

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('site name')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="site_name" lay-verify="required" lay-reqtext="{:lang('site name can not empty')}"
                                           placeholder="{:lang('site name')}" value="" class="layui-input">
                                    <!--                                    <tip>填写自己部署网站的名称。</tip>-->
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('site domain')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="site_domain" lay-verify="url" lay-reqtext="{:lang('site domain can not empty')}"
                                           placeholder="{:lang('site domain')}" value="" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('site email')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="site_email" lay-verify="email" lay-reqtext="{:lang('site email can not empty')}"
                                           placeholder="{:lang('site email')}" value="" class="layui-input">
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <label class="layui-form-label">{:lang('site logo')}</label>
                                <input type="hidden" name="site_logo" id="avatar" class="attach">
                                <div class="layui-input-block">
                                    <div class="layui-upload">
                                        <button type="button" class="layui-btn layui-btn-primary" data-path="logo" id="uploads"><i
                                                class="icon icon-upload3"></i>{:lang('upload')}
                                            <button type="button" class="layui-btn layui-btn-primary" id="selectAttach" data-href="{:url('sys.attach/select')}?mime=image"><i class="icon icon-upload3"></i>{:lang('select attach')}</button>

                                        </button>
                                        <div class="layui-upload-list">
                                            <img class="layui-upload-img" id="addPic">
                                            <p id="demoText"></p>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label required">{:lang('site title')}</label>
                                <div class="layui-input-block">
                                    <textarea name="site_seo_title" placeholder="{:lang('site title')}" class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">{:lang('meta keywords')}</label>
                                <div class="layui-input-block">
                                    <textarea name="site_seo_keywords" class="layui-textarea"
                                              placeholder="多个关键词用英文状态 , 号分割"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">{:lang('meta description')}</label>
                                <div class="layui-input-block">
                                    <textarea name="site_seo_desc" placeholder="建议200字以内"
                                              class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label required">{:lang('all right')}</label>
                                <div class="layui-input-block">
                                    <textarea name="site_copyright" class="layui-textarea">© 2019 www.lemocms.com MIT license</textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">

                                <button type="button" class="layui-btn" lay-submit lay-filter="submit">{:lang('submit')}</button>
                                <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="cancel">{:lang('reset')}</button>

                            </div>

                        </form>
                    </div>

<!--邮箱设置-->
                    <div class="layui-tab-item">
                        <form class="layui-form layui-form-pane" action="{:url('site')}" lay-filter="form-config">

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('email server')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_host" lay-verify="required" lay-reqtext="{:lang('email server is not empty')}"
                                           placeholder="{:lang('email server')}" value="" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('email port')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_port" lay-verify="required" lay-reqtext="{:lang('port can not empty')}"
                                           placeholder="{:lang('email port')}" value="" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('email addr')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_addr" lay-verify="required" lay-reqtext="{:lang('email addr can not empty')}"
                                           placeholder="{:lang('email addr')}" value="" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('send email person')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_id" placeholder="{:lang('send email person')}" value=""
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('email password')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_pass" placeholder="{:lang('email password')}" value=""
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('server mailbox protocol')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email_secure" placeholder="{:lang('Server mailbox protocol')}" value=""
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                    <button type="button" class="layui-btn" lay-submit lay-filter="submit">{:lang('submit')}</button>
                                    <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="cancel">{:lang('reset')}</button>
                            </div>

                        </form>
                    </div>

<!--                    短信设置-->
                    <div class="layui-tab-item">
                        <form class="layui-form layui-form-pane" action="{:url('site')}" lay-filter="form-config">
                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('sms appid')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="sms_appid" lay-verify="required" placeholder="{:lang('sms appid')}" value=""
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('sms appsecret')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="sms_secret" lay-verify="required" placeholder="{:lang('sms appsecret')}" value=""
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('sms product name')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="sms_product" lay-verify="required" placeholder="{:lang('sms product name')}" value=""
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label required">{:lang('sms template id')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="sms_template" lay-verify="required" placeholder="{:lang('sms template id')}" value=""
                                           class="layui-input">
                                </div>
                            </div>


                            <div class="layui-form-item">
                                    <button type="button" class="layui-btn" lay-submit lay-filter="submit">{:lang('submit')}</button>
                                    <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="cancel">{:lang('reset')}</button>

                            </div>

                        </form>
                    </div>

<!--上传配置-->
                    <div class="layui-tab-item">
                        <form class="layui-form layui-form-pane" action="{:url('site')}" lay-filter="form-config">

                            <div class="layui-form-item">
                                <label class="layui-form-label">{:lang('file type')}</label>
                                <div class="layui-input-block">
                                    <input type="text" name="upload_file_type"
                                           value="bmp|png|gif|jpg|jpeg|zip|rar|txt|ppt|xls|doc|mp3|mp4"
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">{:lang('maxfilesize')}</label>
                                <div class="layui-input-inline" style="width: 80px;">
                                    <input type="text" name="upload_file_max" lay-verify="number" value="2048"
                                           class="layui-input">
                                </div>
                                <div class="layui-input-inline layui-input-company"><label class="layui-form-label">M</label></div>
                                <div class="layui-form-mid layui-word-aux">{:lang('tips')}：1 M = 1024 KB</div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-inline">
                                    <button type="button" class="layui-btn" lay-submit lay-filter="submit">{:lang('submit')}</button>
                                    <button type="reset" class="layui-btn layui-btn-primary" lay-submit lay-filter="cancel">{:lang('reset')}</button>

                                </div>

                            </div>

                        </form>
                    </div>

                </div>
        </div>

    </div>

</div>
{include file="common/footer"/}
<script>
    var tableIn;
    layui.config({
        base: "/static/admin/js/",
        version: true
    }).extend({
        Admin: 'Admin'
    }).use(['element','form', 'layer', 'Admin','table'], function () {
        var form = layui.form,$ = layui.jquery,element = layui.element;
        var config = {$config|raw};
        form.val("form-config", config);
        $('#addPic').attr('src',config.site_logo);


    })
</script>
